const express = require("express")
const router = express.Router()
const request = require('request');
const cookie = require("./config/cookie")
//配置路由地址


router.get("/chat_room_server/get_hall_info", (req, res) => {
    const url = "https://nichijou.cn/chat_room_server/get_hall_info"
    req.pipe(request(url)).pipe(res);
})

router.post("/setCookie", (req, res) => {
    console.log(req.query.cookie)
    cookie.cookie = req.query.cookie
    res.send({ message: "ok", cookie: cookie.cookie })
})

module.exports = router